<?php

namespace App\Job\Auto;

use App\Actions\ChatAction;
use App\Dao\AutoReplyDao;
use App\Dao\CommonSettingDao;
use App\Dao\GreetMasterDao;
use App\Dao\PhotoDao;
use App\Dao\UserTeaseDao;
use App\Model\User;
use App\Services\PushMessageService;
use App\Utils\LoggerUtil;
use App\Utils\RedisClient;
use Hyperf\AsyncQueue\Job;
use function Hyperf\Config\config;

class TestChatResQueueJob extends Job
{
    private mixed $data;

    public function __construct($data)
    {
        // 这里最好是普通数据，不要使用携带 IO 的对象，比如 PDO 对象
        $this->data = $data;
    }

    public function handle()
    {
        // TODO: Implement handle() method.
        try {
            LoggerUtil::write("auto_chat_queue_job", $this->data);
            // $body = json_decode($this->data, true);
        } catch (\Exception $e) {
            LoggerUtil::write("auto_chat_queue_job", [$e->getMessage(), $e->getFile(), $e->getLine()]);
        }
    }


}